package com.endpoint.search.feign;

import com.endpoint.common.utils.ResultBean;
import com.endpoint.search.to.BookEsModel;
import com.endpoint.search.to.BookTo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.awt.print.Book;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Project: endpoint
 * @Name: BookFeignService
 * @Author: Jack_Li
 * @Date: 2024/7/5 8:56
 */
@FeignClient("endpoint-book")
public interface BookFeignService {

    @GetMapping("/book/getBookList")
    public ResultBean<List<BookEsModel>> getBookList();

    @GetMapping("/book/getById")
    public ResultBean<BookTo> getById(@RequestParam("bookId")Long bookId);

    @PostMapping("/book/queryBookByUpdateTimeByPage")
    public ResultBean<List<BookEsModel>> queryBookByUpdateTimeByPage(@RequestBody LocalDateTime startDate,
                                                                     @RequestParam("limit") int limit);

}
